home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / gfx / board / rtgmv13.lha / goodies / rtggadgets / RTGGadgets.ad < prev    next >
Text File  |  1996-07-04  |  8KB  |  317 lines

  1. TABLE OF CONTENTS
  2.  
  3. RTGGadget/RTGGDownRender
  4. RTGGadget/RTGGHitRender
  5. RTGGadget/RTGGUpRender
  6. RTGGadgets/CreateRTGGadgetA
  7. RTGGadgets/CreateRTGGList
  8. RTGGadgets/DeleteRTGGadget
  9. RTGGadgets/DeleteRTGGList
  10. RTGGadgets/DrawRTGGList
  11. RTGGadgets/RefreshRTGGList
  12. RTGGadgets/RTGGAddIPH
  13. RTGGadgets/RTGGCloseInput
  14. RTGGadgets/RTGGHitTest
  15. RTGGadgets/RTGGOpenInput
  16. RTGGadgets/RTGGRemIPH
  17. RTGGadget/RTGGDownRender                             RTGGadget/RTGGDownRender
  18.  
  19.    NAME
  20.        RTGGDownRender -- Render gadget in down position
  21.  
  22.    SYNOPSIS
  23.        RTGGDownRender(list, akt);
  24.  
  25.        RTGGDownRender(struct RTGGlist *, struct RTGGadget *);
  26.  
  27.    FUNCTION
  28.        Render gadget in down position (i.e. pointer is over gadget and
  29.        button pressed).
  30.        This function is called by RefreshRTGGList.
  31.        It can be replaced by a custom function.
  32.  
  33.    INPUTS
  34.        list - pointer ot gadget list
  35.        akt  - pointer to gadget
  36.  
  37.  
  38. RTGGadget/RTGGHitRender                               RTGGadget/RTGGHitRender
  39.  
  40.    NAME   
  41.        RTGGHitRender -- Render gadget in hit position
  42.  
  43.    SYNOPSIS
  44.        RTGGHitRender(list, akt);
  45.  
  46.        RTGGHitRender(struct RTGGlist *, struct RTGGadget *);
  47.  
  48.    FUNCTION
  49.        Render gadget in hit position (i.e. pointer is over gadget)
  50.        This function is called by RefreshRTGGList.
  51.        It can be replaced by a custom function.
  52.  
  53.    INPUTS
  54.        list - pointer ot gadget list
  55.        akt  - pointer to gadget
  56.  
  57.  
  58. RTGGadget/RTGGUpRender                                 RTGGadget/RTGGUpRender
  59.  
  60.    NAME
  61.        RTGGUpRender -- Render gadget in up position
  62.  
  63.    SYNOPSIS
  64.        RTGGUpRender(list, akt);
  65.  
  66.        RTGGUpRender(struct RTGGlist *, struct RTGGadget *);
  67.  
  68.    FUNCTION
  69.        Render gadget in down position (i.e. pointer is not over gadget).
  70.        This function is called by RefreshRTGGList.
  71.        It can be replaced by a custom function.
  72.  
  73.    INPUTS
  74.        list - pointer ot gadget list
  75.        akt  - pointer to gadget
  76.  
  77. RTGGadgets/CreateRTGGadgetA                       RTGGadgets/CreateRTGGadgetA
  78.  
  79.    NAME
  80.        CreateRTGGadgetA -- Allocate and initialize an RTG Gadget
  81.  
  82.    SYNOPSIS
  83.        result = CreateRTGGadgetA(list, id, tags);
  84.  
  85.        int CreateRTGGadgetA(struct RTGGList, int, struct TagItem *);
  86.  
  87.    FUNCTION
  88.        Create an RTG Gadget with id in list list
  89.  
  90.    INPUTS
  91.        list - pointer to an RTG gadget list
  92.        id   - Unique identification number of this gadget
  93.        tags - pointer to a tag list. The tagitems are as follows:
  94.  
  95.            RGADT_LeftEdge      Left edge of gadget (x coordinate)
  96.            RGADT_TopEdge       Top edge of gadget (y coordinate)
  97.            RGADT_Width         Width of gadget
  98.            RGADT_Height        Height of gadget
  99.            RGADT_Flags         Flags. See below.
  100.            RGADT_HitTest       Custom function for hit testing
  101.            RGADT_HitRender     Custom function for rendering hit gadget
  102.            RGADT_DownRender    Custom function for rendering pressed gadget
  103.            RGADT_UpRender      Custom function for rendering depressed gadget
  104.            RGADT_Force         Force this gadet id. Error if already present
  105.            RGADT_HitPen        Set the hit pen for the standard renderer
  106.            RGADT_UpPen         Set up pen
  107.            RGADT_DownPen       Set down pen
  108.            RGADT_Key           key to activate gadget
  109.  
  110.  
  111.        The flags field can have the following values:
  112.  
  113.            RGADF_HITHILITE     The gadget is hihglited when the mouse is
  114.                                positioned above it.
  115.  
  116.    RESULT
  117.        The result is the gadgets id, or -1 if ther was an error.
  118.        An error also occurs if the gadget`s id was already in use while
  119.        setting the RGADT_Force tag to TRUE.
  120.  
  121.    NOTE
  122.        The key to activate the gadget is the latin 1 representation, not
  123.        the rawkey code.
  124.  
  125. RTGGadgets/CreateRTGGList                           RTGGadgets/CreateRTGGList
  126.  
  127.    NAME   
  128.        CreateRTGGList  --  Create and initialize RTGGList header
  129.  
  130.    SYNOPSIS
  131.        GList = CreateRTGGList( screen, flags)
  132.  
  133.        struct RTGGList *CreateRTGGList( struct RTGScreen *, int);
  134.  
  135.    FUNCTION
  136.        Allocate RTGGList header and initialize it.
  137.  
  138.    INPUTS
  139.        screen = Pointer to an initialized RTGScreen
  140.        flags  = flags for this screens gadget list
  141.  
  142.    RESULT
  143.        A pointer to the RTGGList structure, or zero if there was an error
  144.  
  145. RTGGadgets/DeleteRTGGadget                         RTGGadgets/DeleteRTGGadget
  146.  
  147.    NAME   
  148.        DeleteRTGGadget -- Delete an RTG gadget from the list
  149.  
  150.    SYNOPSIS
  151.        id = DeleteRTGGadget(list, id);
  152.  
  153.        int DeleteRTGGadget(struct RTGGList, int);
  154.  
  155.    FUNCTION
  156.        Delete RTG gadget from list.
  157.  
  158.    INPUTS
  159.        list - pointer to a struct RTGGList
  160.        id   - identification number of the gadget to be deleted
  161.  
  162.    RESULT
  163.        The result is the id of the removed gadget.
  164.  
  165. RTGGadgets/DeleteRTGGList                           RTGGadgets/DeleteRTGGList
  166.  
  167.    NAME   
  168.        DeleteRTGGList -- Delete a list of RTG gadgets
  169.  
  170.    SYNOPSIS
  171.        success = DeleteRTGGList(list, force);
  172.  
  173.        BOOL DeleteRTGGList(struct RTGGList *, BOOL);
  174.  
  175.    FUNCTION
  176.        Delete a list of RTG gadgets, including the list header.
  177.  
  178.    INPUTS
  179.        list - a pointer to the RTGGList structure to be deleted
  180.        force - a boolean flag to force the list to be deleted, even if there
  181.                are gadgets left in it.
  182.  
  183.    RESULT
  184.        a boolean value of TRUE indicates successful deletion.
  185.  
  186. RTGGadgets/DrawRTGGList                               RTGGadgets/DrawRTGGList
  187.  
  188.    NAME   
  189.        DrawRTGGList -- Draw a list of RTG Gadgets in their "up" position
  190.  
  191.    SYNOPSIS
  192.        DrawRTGGList(list);
  193.  
  194.        DrawRTGGList(struct RTGGList *);
  195.  
  196.    FUNCTION
  197.        Draw a list of RTG Gadgets in their "up" position :)
  198.  
  199.    INPUTS
  200.        list - a pointer to an RTGGList structure
  201.  
  202.    RESULT
  203.  
  204. RTGGadgets/RefreshRTGGList                         RTGGadgets/RefreshRTGGList
  205.  
  206.    NAME   
  207.        RefreshRTGGList -- Refresh and redraw list of gadgets
  208.  
  209.    SYNOPSIS
  210.        RefreshRTGGList(list)
  211.  
  212.        void RefreshRTGGList(struct RTGGList *);
  213.  
  214.    FUNCTION
  215.        Refresh the state of the gadgets in list list and redraw everything.
  216.  
  217.    INPUTS
  218.        list - pointer to an RTGGList
  219.  
  220. RTGGadgets/RTGGAddIPH                                   RTGGadgets/RTGGAddIPH
  221.  
  222.    NAME   
  223.        RTGGAddIPH -- Add Input handler to system
  224.  
  225.    SYNOPSIS
  226.        RTGGAddIPH();
  227.  
  228.        void RTGGAddIPH(void);
  229.  
  230.    FUNCTION
  231.        Install input handler
  232.  
  233.    INPUTS
  234.  
  235.    RESULT
  236.  
  237. RTGGadgets/RTGGCloseInput                           RTGGadgets/RTGGCloseInput
  238.  
  239.    NAME
  240.        RTGGCloseInput -- Close input device
  241.  
  242.    SYNOPSIS
  243.        RTGGCloseInput;
  244.  
  245.        void RTGGCloseInput(void);
  246.  
  247.    FUNCTION
  248.        Close input device
  249.  
  250.    INPUTS
  251.  
  252.    RESULT
  253.  
  254. RTGGadgets/RTGGHitTest                                 RTGGadgets/RTGGHitTest
  255.  
  256.    NAME   
  257.        RTGGHitTest -- Test gadget hitbox against mouse coordinates
  258.  
  259.    SYNOPSIS
  260.        RTGGHitTest(akt, x, y);
  261.  
  262.        int RTGGHitTest(struct RTGGadget *, int, int);
  263.  
  264.    FUNCTION
  265.        This function tests if the point given by x,y is inside the gadget`s
  266.        hit box.
  267.        This function is called automatically by RefreshRTGGList.
  268.        It can be replaced by a user-defined function for more complicated
  269.        or special cases.
  270.  
  271.    INPUTS
  272.        akt - Gadget to test
  273.        x   - x coordinate of test point
  274.        y   - y coordinate of test point
  275.  
  276.    RESULT
  277.        0 - no hit
  278.        1 - hit
  279.  
  280.    NOTES
  281.  
  282.  
  283. RTGGadgets/RTGGOpenInput                             RTGGadgets/RTGGOpenInput
  284.  
  285.    NAME
  286.        RTGGOpenInput -- Open input device
  287.  
  288.    SYNOPSIS
  289.        RTGGOpenInput;
  290.  
  291.        void RTGGOpenInput(void);
  292.  
  293.    FUNCTION
  294.        Open input device
  295.  
  296.    INPUTS
  297.  
  298.    RESULT
  299.  
  300. RTGGadgets/RTGGRemIPH                                   RTGGadgets/RTGGRemIPH
  301.  
  302.    NAME
  303.        RTGGRemIPH -- Remove input handler
  304.  
  305.    SYNOPSIS
  306.        RTGGRemIPH();
  307.  
  308.        void RTGGRemIPH(void);
  309.  
  310.    FUNCTION
  311.        Install input handler
  312.  
  313.    INPUTS
  314.  
  315.    RESULT
  316.  
  317.